package com.government.company.service.impl;

import java.util.List;

import com.government.company.domain.UserCompanyLog;
import com.government.company.mapper.UserCompanyLogMapper;
import com.government.company.service.IUserCompanyLogService;
import org.springframework.transaction.annotation.Transactional;
import com.government.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户企业修改日志Service业务层处理
 *
 * @author system
 * @date 2024-09-27
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UserCompanyLogServiceImpl implements IUserCompanyLogService
{
    @Autowired
    private UserCompanyLogMapper userCompanyLogMapper;

    /**
     * 查询用户企业修改日志
     *
     * @param id 用户企业修改日志主键
     * @return 用户企业修改日志
     */
    @Override
    public UserCompanyLog selectUserCompanyLogById(Long id)
    {
        return userCompanyLogMapper.selectUserCompanyLogById(id);
    }

    /**
     * 查询用户企业修改日志列表
     *
     * @param userCompanyLog 用户企业修改日志
     * @return 用户企业修改日志
     */
    @Override
    public List<UserCompanyLog> selectUserCompanyLogList(UserCompanyLog userCompanyLog)
    {
        return userCompanyLogMapper.selectUserCompanyLogList(userCompanyLog);
    }

    /**
     * 新增用户企业修改日志
     *
     * @param userCompanyLog 用户企业修改日志
     * @return 结果
     */
    @Override
    public int insertUserCompanyLog(UserCompanyLog userCompanyLog)
    {
        userCompanyLog.setCreateTime(DateUtils.getNowDate());
        return userCompanyLogMapper.insertUserCompanyLog(userCompanyLog);
    }

    /**
     * 修改用户企业修改日志
     *
     * @param userCompanyLog 用户企业修改日志
     * @return 结果
     */
    @Override
    public int updateUserCompanyLog(UserCompanyLog userCompanyLog)
    {
        return userCompanyLogMapper.updateUserCompanyLog(userCompanyLog);
    }

    /**
     * 批量删除用户企业修改日志
     *
     * @param ids 需要删除的用户企业修改日志主键
     * @return 结果
     */
    @Override
    public int deleteUserCompanyLogByIds(Long[] ids)
    {
        return userCompanyLogMapper.deleteUserCompanyLogByIds(ids);
    }

    /**
     * 删除用户企业修改日志信息
     *
     * @param id 用户企业修改日志主键
     * @return 结果
     */
    @Override
    public int deleteUserCompanyLogById(Long id)
    {
        return userCompanyLogMapper.deleteUserCompanyLogById(id);
    }
}
